package com.bkgy.controller.planking.controller;

import com.alibaba.fastjson.JSONObject;
import com.bkgy.controller.planking.entity.ProfitEntity;
import com.bkgy.controller.planking.service.ProfitService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/profit")
public class profitController {

    @Autowired
    private ProfitService profitService;

    @Operation(summary = "getProfit", description = "生产效益")
    @PostMapping("/getProfit")
    public List<ProfitEntity> getProfit(@RequestBody JSONObject json) {
        return profitService.getProfit(json);
    }
}
